BEGIN {
	#初始化设定packet被drop的数目
	highest_packet_id = 0;
}
{
	#如果第5列是“---”,显然为WLAN网络的trace格式
	if($5 == "---") 
	{
		action = $1;
		time = $2;
		report_node = $3;
		layer = $4;
		packet_id = $6;
		packet_type = $7;
		packet_size = $8;
	}
	else
	{	action = $1;
		time = $2;
		from_node = $3;
		to_node = $4;
		packet_type = $5;
		packet_size = $6;
		seq_num = $11;
		packet_id = $12;
	}
	
	if(action == "r" && from_node == 6 && to_node == 7 && end_time[packet_id] == 0)
	{
		recv_byte_sum[i+1] = recv_packet_num[i] + packet_size;
		
		if(init == 0)
		{
			start_time = time;
			init = 1;
			}
		end_time[i] = time;
		i = i + 1;
	}


}
END{
	printf("%f %f\n", end_time[0], 0);
	for(j = 1; j < i; j++)
	{
		th = recv_byte_sum[j] * 8 /((end_time[j] - start_time) * 1000);
		printf("%f %f\n", end_time[j], th);
		}
	printf("%f %f", end_time[i-1], 0);
	}

